<%@ page import="java.util.List" %>
<%@ page import="com.example.JAVAWEBTEMP1.pojo.Student" %>
<%@ page import="java.util.ArrayList" %>
<%@ page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" language="java"%>
<!DOCTYPE html>
<html>
<head>
    <title>JSP - Hello World</title>
</head>
<body>
<h1><%= "Hello World!" %>
</h1>
<br/>
<a href="hello-servlet">Hello Servlet</a>
<%
    List<Student> studentList= (List<Student>) request.getAttribute("strList");
%>

<table border="2">
    <tr>
        <td><%="身份id"%></td>
        <td><%="姓名"%></td>
        <td><%="年龄"%></td>
        <td><%="手机号"%></td>
    </tr>
    <%for (Student student : studentList) {%>
    <tr>
        <td><%=student.getId()%></td>
        <td><%=student.getName()%></td>
        <td><%=student.getAge()%></td>
        <td><%=student.getPhone()%></td>
    </tr>
    <%}%>
</table>
</body>
</html>